package com.example.coursehub.entity;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Getter
@Setter
@Entity
@Table(name = "user", schema = "courseHub")
@NoArgsConstructor  // Lombok 提供无参构造函数
@AllArgsConstructor // Lombok 提供全参构造函数
public class User {
    @Id
    @Column(name = "user_id", nullable = false, length = 100)
    //规则：U+user_account
    private String userId;

    @Column(name = "user_name", length = 100)
    private String userName;

    @Column(name = "user_account", length = 100)
    private String userAccount;

    // todo：加盐
    @Column(name = "user_password", length = 100)
    private String userPassword;

    public User(String userId) {
    }
}